using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DataStructure
{
    public class RBT2Dictionary<Key, Value> : IDictionary<Key, Value> where Key : IComparable<Key>
    {
        private RBT2<Key,Value> rbt2;
        public RBT2Dictionary()
        {
            rbt2 = new RBT2<Key,Value>();
        }
        public int Count => rbt2.Count;

        public bool IsEmpty => rbt2.IsEmpty;

        public void Add(Key key, Value value)
        {
            rbt2.Add(key, value);
        }

        public bool ContainsKey(Key key)
        {
            return rbt2.Contains(key);
        }

        public Value Get(Key key)
        {
            return rbt2.Get(key);
        }

        public void Remove(Key key)
        {
            //rbt2.Remove(key);
        }

        public void Set(Key key, Value value)
        {
            rbt2.Set(key, value);
        }
    }
}